package first.endtoend

import first.endtoend.Trace

/*
service implemented to render trace as JSON  filtering by category
 */

class TraceService
{

    def serviceMethod()
    {

    }


    def toJson(Trace aTrace)
    {


        if (aTrace != null)
        {

            [
                    id         : aTrace.id,
                    agent      : aTrace.agent,
                    family     : aTrace.family,
                    dateCreated: aTrace.dateCreated,
                    dateOp     : aTrace.dateOp,
                    latitude   : aTrace.latitude,
                    longitude  : aTrace.longitude,
                    pathPhoto  : aTrace.pathPhoto,
                    precision  : aTrace.precision
            ]


        }
    }
}
